<?php

/**
 * Created by PhpStorm.
 * User: 张彪
 * Date: 2016/5/11 0011
 * Time: 下午 1:39
 */
class Jingdian extends Base_Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->load->model('jingdian_model');
        $this->load->model('city_model');
    }


    public function getlist()
    {
        $data = $_GET;
        $re = $this->jingdian_model->getlist($data);
        $this->success($re);
    }

    public function detail()
    {
        $id = $_GET['id'];
        $data = $this->jingdian_model->detail($id);
        if(!$data)
        {
            $this->error('未找到数据！');
        }

//        $con_data['type'] = 'ACTIVITY';
//        $con_data['id'] = $id;
//        $con_data['limit'] = 5;
//        $con_data['offset'] = 0;
//        $coms = $this->comment_model->getActivityOrTrackComments($con_data);

        $this->success(array($data));

    }

    /**
     * 获取景点标签
     */
    public function gettag()
    {

        $data = $this->city_model->getcitytype();
        $this->success(array($data));
    }


}